package com.bytz.modules.cms.reseller.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.bytz.common.system.base.service.ICrudService;
import com.bytz.modules.cms.reseller.entity.Reseller;
import com.bytz.modules.cms.reseller.model.ResellerModel;

import javax.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.List;

public interface IAdminResellerService extends ICrudService<Reseller, ResellerModel> {

    /**
     * 根据id重置密码
     */
    Boolean resetPassword(String id);

    /**
     * 根据经销商重置密码
     */
    Boolean resetPassword(Reseller reseller);

    /**
     * 生成价格表并打包下载
     */
    void generatePriceList(HttpServletResponse response, Wrapper<Reseller> wrapper);

    /**
     * 更新状态
     */
    Boolean changeStatus(String id, String status);

    /**
     * 根据id获取一条
     */
    ResellerModel getModelById(String id);

    /**
     * excel导入经销商
     */
    void importExcel(List<Reseller> list);

    /**
     * 优惠卷通过经销商ID 联查经销商名称
     */
    List<Reseller> findByResellerName(Collection<String> resellerNames);

    /**
     * 根据名称查询经销商
     */
    List<Reseller> searchByName(String name);
}
